﻿namespace nnp7ChatDemo
{
    /// <summary>
    /// 文字聊天数据包
    /// </summary>
    public class ChatPkg
    {
        public ChatPkg()
        {

        }

        public ChatPkg(string name, string line)
        {
            Name = name;
            Line = line;
            Time = DateTime.Now;
        }

        public string Name { get; set; }

        public string Line { get; set; }

        public DateTime Time { get; set; }


        public override string ToString()
        {
            return $"[{Name} {Time.ToString("HH:mm")}]:{Line}";
        }
    }

}
